import request from '@/utils/request'

export function magnetTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/table`,
    method: 'post',
    data: query
  })
}

export function magnetSelectData(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/list`,
    method: 'post',
    data: query
  })
}

export function magnetSearchTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/search`,
    method: 'post',
    data: query
  })
}

export function magnetLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/load`,
    method: 'get',
    params: query
  })
}

export function magnetSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/save`,
    method: 'post',
    data: query
  })
}

export function magnetDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/delete`,
    method: 'post',
    data: query
  })
}

export function magnetExport(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/search/magnet/rule/export`,
    method: 'post',
    data: query
  })
}
